# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-python-mystrom
_pkgname=python-mystrom
pkgver=0.5.0
pkgrel=1
pkgdesc="Python API for controlling myStrom switches/plugs"
url="https://github.com/fabaff/python-mystrom"
arch="noarch"
license="MIT"
depends="py3-click py3-requests"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces=py-mystrom # Backwards compatibility
provides=py-mystrom=$pkgver-r$pkgrel # Backwards compatibility

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="db330bbc0e304224b586caa9d2ea646cb25beff165268d68b52e6d470cd5fa2db71bfe7d21628f74679cd8480c7f0269c42ea3a3fc76636bec3ff184bf9a80d9  python-mystrom-0.5.0.tar.gz"
